<?php
use frontend\assets\AppAsset;
use yii\helpers\Url;

AppAsset::register($this);
$this->title = empty($parent_list['category_name']) ? '' : $parent_list['category_name'];
$this->params['breadcrumbs'][] = $this->title;
$image_bath_url = Yii::$app->params['imageBathUrl'];
$main_img = empty($buy_set['img_main']) ? '' : $buy_set['img_main'];
?>
<?php
AppAsset::addCss($this,$image_bath_url."/static/pc/css/util/flickity.css");
AppAsset::addCss($this,$image_bath_url."/static/pc/css/product-xxylist.css");
AppAsset::addCss($this,$image_bath_url."/static/pc/css/common/prouduct-list.css");
AppAsset::addCss($this,$image_bath_url."/static/pc/css/common/proudct-left.css");
AppAsset::addCss($this,$image_bath_url."/static/pc/css/menu.css");
AppAsset::addCss($this,$image_bath_url."/static/pc/css/common/pagination.css");
?>
    <article>
    <div class="w br4 mt50"></div>
    <section class="content w mt40">
    <!-- 左边引导 -->
    <div class="content-left-box left-w fl">
        <h3 class="h3"><?=empty($parent_list['category_name']) ? '' : $parent_list['category_name']?></h3>
        <!-- 分类品类品牌推荐 -->
        <?= \frontend\widget\CategoryMenuWidget::widget() ?>
    </div>
    <!-- 左边引导 End-->
    <!-- 右边 -->
    <div class="content-right-box right-w fr">
    <div class="right_content_banner mt20 pr">
        <?php if(!empty($main_img)){?>
            <img src="<?=$image_bath_url . '/' . $main_img ?>" alt="<?=empty($buy_set['img_main_alt']) ? '' : $buy_set['img_main_alt']?>"/>
        <?php }else{?>
            <img src="<?=$image_bath_url ?>/product-xxylist/gmcdp_kv.png" alt=""/>
        <?php }?>

    </div>
    <div class="product_list_box mt40">
    <!-- <div class="select">
         <div class="select_tool js-show-select">
             <span class="icon icon-sl"></span>
             筛选器
             <span class="icon icon-sr"></span>
         </div>
         <div class="fr pagination_list">
         <div class="pagination  pr">
             <a href="javascript:;" class="icon prev pa"> < </a>
             <ul class="pagination_box fl">
                 <li class="item fl"><a href="javascript:;" class="link">1</a> </li>
                 <li class="item fl"><a href="javascript:;" class="link">2</a> </li>
                 <li class="item fl"><a href="javascript:;" class="link">3</a> </li>
                 <li class="item fl"><a href="javascript:;" class="link">...</a> </li>
                 <li class="item fl"><a href="javascript:;" class="link">10</a> </li>
             </ul>
             <a href="javascript:;" class="icon next pa"> > </a>
         </div>
         <div class="href_page pr">跳转到第<input type="text" class="icon icon-arrow-down page_val" disabled/>页
            <ul class="href_page_list pa">
                <li>1</li>
                <li>2</li>
                <li>3</li>
                <li>4</li>
                <li>5</li>
            </ul>
         </div>
         <div class="total">共<span>180</span>件产品</div>
         </div>
     </div>
     <div class="select_tool_list ">
         <ul class="tool_list">
             <li class="defalt fl">默认</li>
             <li class="brand fl pr">品牌 <span class="icon icon-arrow-down"></span>
                 <ul class="brand_select_list pa">
                     <li class="item">Callganis</li>
                     <li class="item">Callganis</li>
                     <li class="item">Callganis</li>
                     <li class="item">Callganis</li>
                     <li class="item">Callganis</li>
                 </ul>
             </li>
             <li class="price fl">价格 ↑</li>
             <li class="hotnew fl">最新 ↑</li>
             <li class="like fl">人气 ↑</li>
         </ul>
     </div>-->
    <div class="proudct_list clear">
    <ul class="proudct_list_ul">
    <?php if(!empty($main_goods_list)){?>
    <?php foreach($main_goods_list as $value){?>
    <li class="item pr">
        <div class="item_img">
            <span class="icon icon-hart"></span>
            <ul class="item_img_list">
                <?php foreach($value['color_img_list'] as $val){?>
                <li class="img_item"><a href="javascript:;"><img src="<?=$image_bath_url . '/' . $val['img_url'] ?>" alt="white"></a></li>
                <?php }?>
            </ul>
        </div>
        <div class="item_info">
            <h4> <span class="icon icon-title-l"></span><?=$value['brand_name'] ?></h4>
            <p class="info"><span class="info_br"><?=$value['series'] ?></span> <?=$value['goods_name_cn'] ?></p>
            <p><del><?=$value['unit'].$value['market_price'] ?></del><span class="item_price"><?=$value['unit'].$value['sale_price'] ?></span></p>
        </div>
        <ol class="dots mid">
            <?php foreach($value['color_img_list'] as $val){?>
            <li class="dot"></li>
            <?php }?>
<!--            <li class="more"> <a href="javascript:;" class="link-text"> 更多 > </a></li>-->
        </ol>
    </li>
    <?php }?>
    <?php }?>
    </ul>
    <!--          <div class="pagination_list mt30">
                  <div class="pagination  pr">
                      <a href="javascript:;" class="icon prev pa"> < </a>
                      <ul class="pagination_box fl">
                          <li class="item fl"><a href="javascript:;" class="link">1</a> </li>
                          <li class="item fl"><a href="javascript:;" class="link">2</a> </li>
                          <li class="item fl"><a href="javascript:;" class="link">3</a> </li>
                          <li class="item fl"><a href="javascript:;" class="link">...</a> </li>
                          <li class="item fl"><a href="javascript:;" class="link">10</a> </li>
                      </ul>
                      <a href="javascript:;" class="icon next pa"> > </a>
                  </div>
                  <div class="href_page">跳转到第<input type="text" class="icon icon-arrow-down page_val" disabled/>页</div>
                  <div class="total">共<span>180</span>件产品</div>
              </div>-->
    </div>
    </div>
    </div>
    <!-- 右边 End-->
    </section>
    </article>
<?= \Yii::$app->view->renderFile('@app/views/common/back-top.php');?>
<?php
AppAsset::addJs($this,$image_bath_url."/static/pc/js/util/flickity.pkgd.min.js");
AppAsset::addJs($this,$image_bath_url."/static/pc/js/common/proudct-list.js");
?>